package org.app.entities;

import java.util.ArrayList;
import java.util.List;

/**
 * 只包含节点基本信息
 * @author zheng
 *
 */
public class MyNode {
	String name;
	List<MyNode> children=new ArrayList();
	
	
	
	public MyNode(String name) {
		super();
		this.name = name;
	}

	public int getChildNum(){
		return children.size();
	}
	
	public void add(MyNode node){
		children.add(node);
	}
	
	public void add(MyNode[] nodes){
		for(MyNode node:nodes){
			children.add(node);
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<MyNode> getChildren() {
		return children;
	}

	public void setChildren(List<MyNode> children) {
		this.children = children;
	}
	
	

	public String toString(){
		return name;
	}
}
